<html>
<head>
    <title>${title}</title>
    <style>
        @page {
            size: 8.5in 11in;
            @bottom-center {
                content: "page " counter(
                        page
                ) " of  " counter(
                        pages
                );
            }
        }
        /*特别重要！！！指定了字体中文才会显示*/
        body{font-family: 'SimSun'}
    </style>
</head>
<body>
<h1>测试pdf打印</h1>
<div>
    <div style="align-content: center">
        <h1>${title}</h1>
        <!-- src链接应该写文件服务器地址， 出于演示，这里用的localhost -->
        <img alt="加载中..." src="${imageUrl}"/>
    </div>
    <table>
        <tr>
            <td><b>Name</b></td>
            <td><b>Age</b></td>
            <td><b>Sex</b></td>
        </tr>
        <#list userList as user>
            <tr>
                <td>${user.name}</td>
                <td>${user.age}</td>
                <td><#if user.sex = 1> male <#else> female </#if></td>
            </tr>
        </#list>
    </table>
</div>
<div>
    <a href="https://www.baidu.com/" target="_blank">百度</a>
</div>
</body>
</html>
